package com.yubest.customserializer.dto;

import com.yubest.customserializer.anno.*;
import com.yubest.customserializer.enums.Status2Enum;
import com.yubest.customserializer.enums.StatusEnum;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @Author hweiyu
 * @Description
 * @Date 2021/3/1 14:01
 */
@NoArgsConstructor
@Data
@Accessors(chain = true)
public class DemoRespDTO implements Serializable {

    private static final long serialVersionUID = 1019466745376831818L;

    /**
     * @see Base64JsonSerializer
     * 添加额外字段 fileSize ，记录 file 的长度
     */
    @Base64Serializer
    private byte[] file;

    /**
     * @see EnumJsonSerializer
     * 添加枚举描述字符
     */
    @EnumSerializer
    private StatusEnum status11;

    @EnumSerializer(suffix = "Desc")
    private StatusEnum status12;

    @EnumSerializer(enumCls = StatusEnum.class)
    private Integer status13;

    @EnumSerializer
    private Status2Enum status21;

    @EnumSerializer(enumCls = Status2Enum.class)
    private Integer status22;

    @EnumSerializer
    private Integer status3;
}
